# -*- coding:utf-8 -*-
# @Time:2024/4/1921:01
# @Author:miuzg
# @FileName:new test2.py
# @Software:PyCharm
import requests
from user_agent import generate_user_agent

url = 'https://www.maoyan.com/films'
headers = {'User-Agent':generate_user_agent()}

# 代理ip地址
proxy_ip = {'http':'117.42.94:17995'}

# 测试网站
test_url = 'http://httpbin.org/get'

o = requests.get(test_url,headers=headers,proxies=proxy_ip).json().get('origin')
print(o)